﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using zzh_the_Visual_Studio.DAL;
using zzh_the_Visual_Studio.Models;

namespace zzh_the_Visual_Studio.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class LoginController : ControllerBase
    {
        private DAL_Login dallogin = new DAL_Login();

        [HttpPost]
        //查询管理员账号
        public List<manage> postManage(manage a)
        {
            return dallogin.postManage(a);
        }
        //查询学生账号
        public List<dell> postStudent(dell b)
        {
            return dallogin.postStudent(b);
        }
        //查询教师账号
        public List<dell> postTeacher(dell  c)
        {
            return dallogin.postTeacher(c);
        }
        //注册学生账号
        [HttpPost]
        public int createStudents(dell s)
        {
            return dallogin.createStudents(s);
        }//注册教师账号
        public int createTeachers(dell t)
        {
            return dallogin.createTeachers(t);
        }
    }
}